Skip to content

wrap display_name and canonical_name functions#214

Merged
andygrove merged 1 commit into
apache:mainfrom
jdye64:expr_name
Feb 22, 2023
Merged

wrap display_name and canonical_name functions#214
andygrove merged 1 commit into
apache:mainfrom
jdye64:expr_name

Conversation

@jdye64
Copy link
Copy Markdown
Contributor

@jdye64 jdye64 commented Feb 22, 2023

Which issue does this PR close?

Closes #213

Comment thread src/expr.rs
Comment on lines +89 to +91
fn canonical_name(&self) -> PyResult<String> {
Ok(self.expr.canonical_name())
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit: this method is infallible, so no need to wrap in a result.

Suggested change
fn canonical_name(&self) -> PyResult<String> {
Ok(self.expr.canonical_name())
}
fn canonical_name(&self) -> String {
self.expr.canonical_name()
}

Copy link
Copy Markdown
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose display_name, name, and canonical_name in PyExpr

2 participants